<h5 class="memberarea_caption">{$smarty.const.LA_PIC_UPLOAD}</h5>

{if $error}
	<p><span class="red"><b>{$smarty.const.LA_WARNING}</b></span><br />{$error}</p>
{/if}

{if $upload_ok}
	<p><b>{$smarty.const.LA_UPLOAD_SUCCESS}</b></p>
{/if}

{if $image_upload_size && !$error}
	<div style="background-color:white">{$image_upload_size}</div>
{/if}


{if !$error}
	<div style="background-color:white">{$upload_status}</div>
{/if}
<div style="clear:both;height:12px;"></div>

{if $show_form}
	{if $CreditosExtra == 1}
		<p><b>{$smarty.const.EF_TIENE_CREDITOS_EXTRA}</b> {$upload_credits}. </p>
	{/if}
	<table>
		<tr>
			<td>
				<form method='post' action='{$phpself}' enctype='multipart/form-data'>
					<input type='hidden' name='pic_ad_id' value='{$id}' />
					<input type='hidden' name='MAX_FILE_SIZE' value='10000000' />
					<br/>{$smarty.const.LA_FILENAME}<br/>
					<input name='photo' size='50' type='file' onchange="setImage(this.value)" /></p>			
					<input type='submit' class="button" name='submit' value='{$smarty.const.LA_UPLOAD_BUTTON}' />
				</form>			
			</td>
			<td>
				<img id="previewImage" src='{$url}/layout_images/blank.gif' width="100" />
			</td>
		</tr>
	</table>
{/if}

{if !$admin_area}
	{if $transaction_ad_id}
		<br/><form method='get' action='mvial_pay_center.php'><input type='submit' class="button" name='submit' value='{$smarty.const.LA_FINISH}' /></form>
	{else}
		<br/><form method='get' action='member.php'><input type='submit' class="button" name='submit' value='{$smarty.const.LA_FINISH}' /></form>
	{/if}
{else}
	<a href="adm_classifieds_list.php">Back to ad list</a>
{/if}
</p>

<div style="clear:both;height:12px;"></div>

{foreach item=image from=$image_list}
	
	
	<div style="float:left">
	<a href="javascript:openLargeImage('large_picture.php?id={$image.id}')" class="thumb">
	
	{if $set_image_program==0}
		<img src='{$url}/images/{$image.file}' border='0' width="{$image.w}" heigth="{$image.h}" alt="{$smarty.const.LA_LARGE_PIC}" />
	{else}
		<img src='{$url}/images/{$image.file}' border='0' alt="{$smarty.const.LA_LARGE_PIC}" />
	{/if}
	
	</a>
	<a href='{php}?pic_ad_id={$pic_ad_id}&del_id={$image.id}' class="gallery">
	<img src="{$url}/layout_images/new/ad_delete.gif" hspace="3" border="0" alt="{$smarty.const.LA_DEL_IMG_NOW}" /></a>
	</div>
	
	<div style="float:rigth">
	{if $image.main}
		{$smarty.const.LA_MARKED_AS_MAIN}
	{else}
		<a href="?mark_as_main={$image.id}&pic_ad_id={$pic_ad_id}">{$smarty.const.LA_MARK_AS_MAIN}</a>
	{/if}
	</div>
	
	<div style="clear:both"></div>	
	
	<br/><br/>
{/foreach}